// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>MyCompany.MyProject</Solution>
// <Project>MyCompany.MyProject.Application</Project>
// <FileName>IOrderAppService.cs</FileName>
// <CreateTime>2017-04-23 23:05</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-23 23:05" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Pingpp.Models;
using Vecen.BangChuang.BangChuang.Mall.Dtos;

namespace Vecen.BangChuang.BangChuang.Mall {
    /// <summary>
    /// 订单操作
    /// </summary>
    public interface IOrderAppService: IApplicationService {

        /// <summary>
        /// 根据ID获取订单信息
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task<OrderDetailOutDto> GetByIdAsync(int orderId);

        /// <summary>
        /// 提交订单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> SaveOrderAsync(OrderRequestDto input);

        /// <summary>
        /// 获取当前用户的所有订单
        /// </summary>
        /// <returns></returns>
        Task<PagedResultDto<OrderListOutDto>> GetOrdersAsync(GetOrdersRequestDto input);


        /// <summary>
        /// 取消订单
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task BlankOutOrderAsync(int orderId);

        /// <summary>
        /// 获取当前店长卖出的订单记录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<OrderForAgentOutDto>> GetAgentOutOrdersAsync(GetOrdersRequestDto input);

        /// <summary>
        /// 支付
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<Charge> PayAsync(PayRequestDto input);


        /// <summary>
        /// 修改订单价格
        /// </summary>
        /// <returns></returns>
        Task ChangeOrderPriceAsync(ChangeOrderPriceInputDto input);


        /// <summary>
        /// 获取系统内所有订单
        /// </summary>
        /// <returns></returns>
        Task<PagedResultDto<OrderForAdminOutDto>> GetOrdersForAdminAsync(GetOrdersForAdminInputDto input);


        /// <summary>
        /// 订单发货
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task DeliverOrderAsync(OrderDeliverInputDto input);


        /// <summary>
        /// 后台查看订单详情
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task<OrderDetailForAdminOutDto> GetOrderForAdminAsync(int orderId);

        /// <summary>
        /// 申请退货
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task ApplyReturnOrderAsync(OrderReturnInputDto input);


        /// <summary>
        /// 取消退货申请
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task CancelOrderReturnApplyAsycn(int orderId);

        /// <summary>
        /// 获得订单退货信息
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task<OrderReturnOutputDto> GetOrderReturnInfoAysnc(int orderId);

        /// <summary>
        /// 店长退货信息确认
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task ConfirmOrderReturnAsync(OrderReturnConfirmInputDto input);

        /// <summary>
        /// 客户填写退货快递信息
        /// </summary>
        Task OrderReturnExpressInputAysnc(OrderReturnExpressInputDto input);


        /// <summary>
        /// 店长退货收货确认
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task OrderReturnReceivedAsync(OrderReturnReceivedInputDto input);
    }
}